package main

import "fmt"

func main() {
	arr := []int{1, 2, 3}
	myMap := make(map[int]*int)

	for i, v := range arr {
		temp := v
		myMap[i] = &temp
	}
	arr[1] = 11
	fmt.Printf("%t\n", arr)
	for _, v := range myMap {
		fmt.Println(*v)
	}
	fmt.Println("----------------------")
	var1 := make([]int, 3, 5)
	var1[0] = 1
	var1[1] = 1
	var1 = append(var1, 2)
	var1 = append(var1, 2)
	var1 = append(var1, 2)
	var1 = append(var1, 2)
	var1 = append(var1, 2)
	var1 = append(var1, 9)
	var1[8] = 100
	for i, v := range var1 {
		fmt.Println(i, v)
	}
	foo(var1)
	fmt.Println("----------------------")
	fmt.Println(var1)

}

func foo(s []int) {
	s[1] = 2020
}
